From 68fd7961257937586fb072ffd81491b1c9231c0a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 22 Jan 2020 00:29:43 -0500 Subject: [PATCH] css: Make performance test more flexible Allow to specify the name of the mark that we're looking for the first instance of. --- testsuite/css/performance/test-css-performance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/css/performance/test-css-performance.c b/testsuite/css/performance/test-css-performance.c index 40d996ddc2..c4fbc54823 100644 --- a/testsuite/css/performance/test-css-performance.c +++ b/testsuite/css/performance/test-css-performance.c @@ -30,8 +30,10 @@ callback (const SysprofCaptureFrame *frame, #define MILLISECONDS(v) ((v) / (1000.0 * G_TIME_SPAN_MILLISECOND)) static int opt_rep = 10; +static char *opt_mark; static GOptionEntry options[] = { + { "mark", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, &opt_mark, "Name of the mark", "NAME" }, { "runs", 'r', G_OPTION_FLAG_NONE, G_OPTION_ARG_INT, &opt_rep, "Number of runs", "COUNT" }, { NULL, } }; @@ -101,7 +103,7 @@ main (int argc, char *argv[]) if (error) g_error ("Opening syscap file: %s", error->message); - data.group = "style"; + data.group = opt_mark ? opt_mark : "style"; data.value = 0; cursor = sysprof_capture_cursor_new (reader); -- 2.30.2